#ifndef MESH_BUFFER_HPP
#define MESH_BUFFER_HPP

#include "../Buffer/Buffers.hpp"
#include "MeshStructure.hpp"

namespace Model {

class MeshBuffer {
public:
  MeshBuffer(const MeshRef &ref);
  MeshBuffer() : _mesh(), _buffer() {}
  ~MeshBuffer();

  Buffer::BufferRef GetBuffer() { return _buffer; }
  MeshRef GetMesh() const { return _mesh; }

  void SetMesh(const MeshRef &ref) {
    _mesh = ref;
    Init();
  }

private:
  void Init();

private:
  MeshRef _mesh;
  Buffer::BufferRef _buffer;
};

} // namespace Model

#endif